package utils

import "math"

// Pagination 分页控制类
type Pagination struct {
	Total uint
	Page  uint
	Size  uint
}

// HasNext 是否存在下一页
func (pagination *Pagination) HasNext() bool {
	return math.Ceil(float64(pagination.Total)/float64(pagination.Size)) > float64(pagination.Page)
}
